<!DOCTYPE html>
<html>
<head>
    <title>运动数据记录表</title>
    #parse("sys/header.html")
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row :gutter="16">
            <div class="search-group">
                <i-col span="4">
                    <i-input v-model="q.name" @on-enter="query" placeholder="名称"/>
                </i-col>
                <i-col span="4">
                    <i-input v-model="q.uid" @on-enter="query" placeholder="用户编号"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
            <div class="buttons-group">
                #if($shiro.hasPermission("sportdata:info"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</i-button>
                #end
                #if($shiro.hasPermission("sportdata:save"))
                <i-button type="info" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</i-button>
                #end
                #if($shiro.hasPermission("sportdata:update"))
                <i-button type="warning" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                #end
                #if($shiro.hasPermission("sportdata:delete"))
                <i-button type="error" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
                #end
            </div>
        </Row>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="sportdata" :rules="ruleValidate" :label-width="100">
            <Form-item label="编号" prop="uid">
                <i-input v-model="sportdata.uid" placeholder="编号" />
            </Form-item>
            <Form-item label="姓名" prop="name">
                <i-input v-model="sportdata.name" placeholder="姓名"/>
            </Form-item>
            <Form-item label="距离" prop="distance">
                <i-input v-model="sportdata.distance" placeholder="距离"/>
            </Form-item>
            <Form-item label="额外长度" prop="distanceExtra">
                <i-input v-model="sportdata.distanceExtra" placeholder="额外长度"/>
            </Form-item>
            <Form-item label="时长" prop="timeLen">
                <i-input v-model="sportdata.timeLen" placeholder="时长"/>
            </Form-item>
            <Form-item label="卡路里" prop="calorie">
                <i-input v-model="sportdata.calorie" placeholder="卡路里"/>
            </Form-item>
            <Form-item label="类型" prop="type">
                <Radio-group v-model="sportdata.type">
                    <Radio label="0">
                        <span>其他</span>
                    </Radio>
                    <Radio label="1">
                        <span>跑步</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <!--<Form-item label="团队编号" prop="teamId">-->
                <!--<i-input v-model="sportdata.teamId" placeholder="团队编号"/>-->
            <!--</Form-item>-->
            <!--<Form-item label="团队名称" prop="teamName">-->
                <!--<i-input v-model="sportdata.teamName" placeholder="团队名称"/>-->
            <!--</Form-item>-->
            <Form-item label="是否是d-one" prop="isDone">
                <i-input v-model="sportdata.isDone" placeholder="是否是d-one"/>
            </Form-item>

            <Form-item label="数据状态" prop="statu">
                <Radio-group v-model="sportdata.statu">
                    <Radio label="0">
                        <span>无效</span>
                    </Radio>
                    <Radio label="1">
                        <span>有效</span>
                    </Radio>
                </Radio-group>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>

<script src="${rc.contextPath}/js/income/sportdata.js?_${date.systemTime}"></script>
</body>
</html>